package com.imperateam.ImperaWorkspacesFeed.client;

import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.gadgets.client.Gadget;
import com.google.gwt.gadgets.client.UserPreferences;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.Panel;
import com.google.gwt.user.client.ui.RootLayoutPanel;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.gadgets.client.Gadget.ModulePrefs;
import com.google.gwt.gadgets.client.Gadget.UseLongManifestName;
import com.google.gwt.gadgets.client.Gadget.AllowHtmlQuirksMode;

@ModulePrefs(title = "Test Impera Gadget", author = "Tal", author_email = "tal@imperateam.com")
@UseLongManifestName(false)
@AllowHtmlQuirksMode(false)
public class ImperaWorkspacesFeed extends Gadget<UserPreferences> {

	@Override
	protected void init(UserPreferences preferences) {
		Panel pane = new FlowPanel();
		pane.setWidth("100%");
		
		Button b = new Button("test button");
		b.addClickHandler(new ClickHandler() {

		      public void onClick(ClickEvent event) {
		        Window.alert("msg");
		      }

		    });
		pane.add(b);
		
		RootPanel.get("rootDiv").add(pane);
		//RootLayoutPanel.get().add(pane);
	}
}
